Value Driven Colors

The Value Driven Colors feature is a powerful tool that enables users to define their own logic for setting colors DIRECTLY for conditional formatting in visualizations.

The Conditional Formatting engine lets users define logic in numerous way using out of the box choices delivered through context menus, drop zones or the advanced dialog. However, users may have their own requirements around the logic behind color indicators, that aren't met with the out of the box options. In this case, you can build your own logic which is first expressed as a mathematical formula and then used with the color drop zone to drive the actual colors base directly on the value of the formula. Importantly, the formula returns RGB or HEX color codes that are directly translated to a color.

"Value" option for Colors

If the datasource contains measures representing colors (i.e., a table containing a column that contains RGB or HEX color codes) or these values have been calculated using formulas, then these colors can be displayed in your visualizations in Discover. For example, you might want to display sales in either green or red, depending on whether they fall above or below a specified value. This can be achieved by defining these colors in the datasource. The user can then add the sales color chip to the query, and easily identify the red and green values.

In this way, custom colors give users an alternative to custom KPIs. Unlike KPIs, they can be defined in the datasource or data model (formatting by cell), and can be displayed in any visualization. This makes it very easy for users to simply add the color chip to query and identify the significant colors in the resulting visual. Also unlike custom KPIs, they are not defined against other measures.

Setting the Value

Drop Zones: To show these colors, drop the measure chip that represents the color measure into the Color drop zone, using the "Value" sub-drop zone .

Dialog: First add the measure chip to the color drop zone. Then open the dialog. From the Color palette menu, choose "Value" and elect whether the values from the measure represent RGB or HEX colors.

Numeric RGB Values

Value colors based on RGB are defined by values that are RGB integers that reflect the color spectrum.

The valid range for an ordinary RGB color is zero (0) to 16,777,215 (&H00FFFFFF). The high byte of a number in this range always equals 0; the lower 3 bytes, from least to most significant byte, determine the amount of red, green, and blue, respectively. The red, green, and blue use 8 bits each, and are represented by an integer between 0 and 255 (&HFF).